//
//  topLineCell.swift
//  hEhL
//
//  Created by 本 on 16/5/11.
//  Copyright © 2016年 本. All rights reserved.
//

import UIKit

class topLineCell: UITableViewCell {

    @IBOutlet weak var PicImageView: UIImageView!
    @IBOutlet weak var mainTitle: UILabel!
    @IBOutlet weak var subTitle: UILabel!
    @IBOutlet weak var readCount: UILabel!
    var model : ABTopLineModel? {
        didSet{
            
            guard let title = model?.title else{
                return
            }
            guard let subT = model?.content else{
                return
            }
            guard let readC = model?.readCount else{
                return
            }
            self.subTitle.text = subT
           self.mainTitle.text =  title
            if model?.readCount == "0" {
                
                self.readCount.hidden = true
            }else{
                self.readCount.text = "\(readC)人阅读"
            }
            let url = NSURL(string: (model?.photo)!)


            PicImageView?.sd_setImageWithURL(url)

        
        }
    
    }
   
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
   
    
    
}
